<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>v-bind及class与style绑定</title>
</head>
<body>
<div id="bind">
    <div :class="[{'active':isActive},errorCls]"></div>
    <div class="static active error"></div>

</div>
<script src="https://unpkg.com/vue/dist/vue.min.js"></script>
<script>
    new Vue({
        el: document.getElementById('bind'),
        data: {
            isActive: true,
            errorCls: 'error'
        }

    })
</script>
</body>
</html>